package pizzadroid.googlecode.com;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;

public class PizzaDroid extends TabActivity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		requestWindowFeature(Window.FEATURE_PROGRESS);
		
		
		Resources res = getResources();
		TabHost tabHost = getTabHost();
		TabHost.TabSpec spec;
		Intent intent;

		intent = new Intent().setClass(this, Favorites.class);
		spec = tabHost.newTabSpec("Favorites").setIndicator("Favoriter", res.getDrawable(R.layout.ic_tab_star)).setContent(intent);
		tabHost.addTab(spec);
		
		intent = new Intent().setClass(this, Search.class);
		spec = tabHost.newTabSpec("Search").setIndicator("Sök", res.getDrawable(R.layout.ic_tab_search)).setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(this, Orders.class);
		spec = tabHost.newTabSpec("Orders").setIndicator("Beställningar", res.getDrawable(R.layout.ic_tab_orders)).setContent(intent);
		
		tabHost.addTab(spec);
		
		tabHost.setCurrentTabByTag("Favorites");
	}
}
